package com.micro.modual.extension;

import com.micro.common.MicroConstant;
import com.micro.common.biz.GeneratorCodeUtil;
import com.micro.common.util.SnowFlakeUtil;
import com.micro.modual.entity.ExchangeRecord;
import com.micro.modual.model.bo.exchangerecord.ExchangeRecordBO;

/**
 * <h1>兑换记录表 延展类</h1>
 *
 * @author LevelCoder
 * @version V1.0.0
 * @email LevelCoder@126.com
 * @date 2020-08-04 00:23:27
 */
public class ExchangeRecordExtension {

    /**
     * <h2>转换: 兑换记录表 新增</h2>
     *
     * @param exchangeRecordBO {@link ExchangeRecordBO} 兑换记录表 新增/修改 请求对象
     * @return {@link ExchangeRecord} 兑换记录表
     */
    public static ExchangeRecord converAddExchangeRecord(ExchangeRecordBO exchangeRecordBO) {
        ExchangeRecord exchangeRecord = new ExchangeRecord();
        exchangeRecord.setId(SnowFlakeUtil.getId());
        return exchangeRecord;
    }

    /**
     * <h2>转换: 兑换记录表 修改</h2>
     *
     * @param exchangeRecordBO {@link ExchangeRecordBO} 兑换记录表 新增/修改 请求对象
     * @return {@link ExchangeRecord} 兑换记录表
     */
    public static ExchangeRecord converEditExchangeRecord(ExchangeRecordBO exchangeRecordBO) {
        ExchangeRecord exchangeRecord = new ExchangeRecord();
        exchangeRecord.setId(exchangeRecordBO.getId());
        return exchangeRecord;
    }
}
